<!-- 弹出层 -->
<?php if ((isset($this->loginUser['usertype_seled'])&&!$this->loginUser['usertype_seled']) || (isset($status) && $status)):?>
    <?php $usertype = $this->config->item('usertype_reg');?>
    <div class="popover-mask" id="_usertype_sel_mask"></div>
    <div class="popover" style="height:auto;margin:-260px 0 0 -230px;wdith:450px;display: none;" id="_usertype_sel_pop">
        <div class="compl_top">
            <span class="fl" id="X-title">选择用户类型</span>
            <!--         <a href="javascript:;" id="TX-win-close" title="关闭" class="close fr">×</a> -->
        </div>
        <div class="compl_con">
            <form action="/auth/type" method="post" id="catupload_form" enctype="multipart/form-data">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr><td height="10"></td></tr>
                    <tr>
                    <td width="80"><font id="pic_label">分类：</font></td>
                    <td>
                        <ul class="reg_con">
                            <?php foreach ($usertype as $key => $value): ?>
                                <li class="reg-sort"> <!-- style="margin-top:10px;width: 200px;height: 40px;background-color: #e0e0e0"-->
                                    <p title="<?=$value['title']?>" align="center">
                                        <input type="radio" name="usertype" value="<?php echo $key;?>" id="sort_<?php echo $key;?>"/>
                                        <label for="sort_<?php echo $key;?>"><?php echo $value['value'];?></label>
                                    </p>
                                </li>
                            <?php endforeach;?>
                        </ul>
                    </td>
                    </tr>
                    <tr><td height="10"></td></tr>
                    <tr><td height="10"></td></tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td><input class="but usertype_commit_type"  type="submit" value="保存"/><span id="T-msg"></span></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
    <script type="text/javascript" src="<?php echo _get_cfg_path('js')?>jquery-1.9.1.min.js"></script>
    <script type="text/javascript">
        $(function () {
            //验证选择分类
            $(".usertype_commit_type").click(function () {
                var usertype = $("input[name='usertype']:checked").val();
                if (usertype == null || usertype == "") {
                    alert("请选择分类");
                    return false;
                }
            });
            $('#_usertype_sel_mask').show();
            $('#_usertype_sel_mask').height($(document).height());
            $('#_usertype_sel_pop').slideDown(200);
        });
    </script>
<?php endif;?>
